<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>我的购物车</title>
		<link rel="stylesheet" href="/css/index.css" />
		<link rel="stylesheet" href="/css/myCard.css" />
	</head>
	<body>
		{{include "shared/header"}}
		<div class="logo-box">
			<div class="logo">
				<a href="">
					<img src="/images/myCar/logo.jpg"/>
				</a>
				<ul class="car-progress">
					<li>
						<div class="buy-step stpe-first"></div>
						<hr class="currentSelectedHr"/>
						<sub class="redPoint"></sub>
						<p class="currentSelectedText">我的购物车</p>
					</li>
					<li>
						<div class="buy-step step-scond"></div>
						<hr />
						<sub class="whitePoint"></sub>
						<p>填写核对购物信息</p>
					</li>
					<li>
						<div class="buy-step step-third"></div>
						<hr />
						<sub class="whitePoint"></sub>
						<p>支付提交</p>
					</li>
					<li>
						<div class="buy-step step-fourth"></div>
						<hr />
						<sub class="whitePoint"></sub>
						<p>订单完成</p>
					</li>
				</ul>
			</div>
		</div>
		<div class="myCar-box">
			<div class="myCar">
				<h1>我的购物车</h1>
				<span>查看购物车商品清单，增加减少商品数量，并勾选想要的商品进入下一步操作</span>
			</div>
			<div class="myCar-content">
				<table>
					<tr>
						<th>
							<input type="checkbox" name="selectAll" id="selectAll" />
							<label for="selectAll">全选</label>
						</th>
						<th>商品</th>
						<th>单价(元)</th>
						<th>数量</th>
						<th>小计(元)</th>
						<th>操作</th>
					</tr>
					{{each Goods as good index}}
					<tr>
						<td><input type="checkbox" /></td>
						<td class="pic1"><img src="/{{good.goodsPic}}"></td>
						<td class="price1">{{good.goodsPrice}}</td>
						<td class="num">{{good.goodsNum}}</td>
						<td></td>
						<td class="delete"><a href="/goods/delete?currentId={{good.id}}">确认删除</a></td>
					</tr>
					{{/each}}
				</table>
			</div>
		</div>
	</body>
	<script src="/js/jquery.min.js"></script>
	<script src="/js/jquery.cookie.js"></script>
	<script>
		if($.cookie().username)
		{
			$(".welcomeToMarket").html("您好");
			$(".name").css("display","inline-block");
			$(".person").css("display","inline-block");
			$(".name").html($.cookie().username);
			$(".person").html("[个人]");
			$("#greed").addClass("greed");
			$("#greed").html("v0");
			$(".logout").html("[&emsp;退出&emsp;]");
			
			$("#greed").click(function(e)
			{
				e.preventDefault();
			});
			$(".logout").on("click",function(e)
			{
				$("#greed").removeClass("greed");
				e.preventDefault();
				alert("点击了");
				$.removeCookie("username");
				location.href = "/";
			});
		};


	</script>
</html>
